<?php

if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );

$config = array (
		'account_login' => array (
				array (
						'field' => 'email',
						'label' => 'email',
						'rules' => 'trim|required|valid_email' 
				),
				array (
						'field' => 'password',
						'label' => 'password',
						'rules' => 'trim|required|min_length[6]|max_length[40]' 
				)
		),
		
		'account_reg' => array (
				array (
						'field' => 'teamName',
						'label' => 'teamName',
						'rules' => 'trim|required|min_length[2]|max_length[20]'
				),
				array (
						'field' => 'email',
						'label' => 'email',
						'rules' => 'trim|required|valid_email'
				),
				array (
						'field' => 'password',
						'label' => 'password',
						'rules' => 'trim|required|min_length[6]|max_length[40]|matches[confirmPassword]'
				),
				array (
						'field' => 'confirmPassword',
						'label' => 'confirmPassword',
						'rules' => 'trim|required|min_length[6]|max_length[40]'
				)
		),
		
		'account_edit' => array(
				array (
						'field' => 'username',
						'label' => 'username',
						'rules' => 'trim|required|min_length[1]|max_length[20]'
				),
				array (
						'field' => 'user_description',
						'label' => 'user_description',
						'rules' => 'trim'
				)
	
		),
		
		'account_cPwd' => array (
				array (
						'field' => 'oldPwd',
						'label' => 'oldPwd',
						'rules' => 'trim|required|min_length[6]|max_length[40]'
				),
				array (
						'field' => 'newPwd',
						'label' => 'newPwd',
						'rules' => 'trim|required|min_length[6]|max_length[40]'
				),
				array (
						'field' => 'confirmPwd',
						'label' => 'confirmPwd',
						'rules' => 'trim|required|min_length[6]|max_length[40]|matches[newPwd]'
				)
		),
		'account_cEmail' => array (
				array (
						'field' => 'password',
						'label' => 'password',
						'rules' => 'trim|required|min_length[6]|max_length[40]'
				),
				array (
						'field' => 'email',
						'label' => 'email',
						'rules' => 'trim|required|valid_email'
				)
		),
		'register_by_phone' => array(
			array (
				'field' => 'phone',
				'label' => '',
				'rules' => 'trim|required|valid_mobile_phone'
			),
			array (
				'field' => 'password',
				'label' => '',
				'rules' => 'trim|required|valid_password'
			),
			array (
				'field' => 'n_email',
				'label' => '',
				'rules' => 'trim|valid_email'
			)
		),
		'register_by_email' => array(
			array (
				'field' => 'n_phone',
				'label' => '',
				'rules' => 'trim|valid_mobile_phone'
			),
			array (
				'field' => 'password',
				'label' => '',
				'rules' => 'trim|required|valid_password'
			),
			array (
				'field' => 'email',
				'label' => '',
				'rules' => 'trim|required|valid_email'
			)
		),
		'update_user_info' => array(/*
			array (
				'field' => 'nickname',
				'label' => '',
				'rules' => 'rtrim|not_empty|max_length[30]'
			),
			array (
				'field' => 'company_name',
				'label' => '',
				'rules' => 'rtrim|not_empty|max_length[30]'
			),*/
			array (
				'field' => 'n_email',
				'label' => '',
				'rules' => 'trim|not_empty|valid_email'
			),
			array (
				'field' => 'n_phone',
				'label' => '',
				'rules' => 'trim|not_empty|valid_mobile_phone'
			),
			array(
				'field' => 'image',
				'label' => '',
				'rules' => 'trim|not_empty'
			)
		)
);
